export const destoryDeep = (instance, root = true) => {
  const nodes = instance.$children || []

  if (nodes.length) {
    for (let node of nodes) {
      destoryDeep(node, false)
    }
  }

  if (!root) {
    instance.$destroy()
  }
}
